package com.aaa.demo111;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test111 {
    public static void main(String[] args) throws InterruptedException {
        DemoSleep demoSleep = new DemoSleep();
        demoSleep.start();
    }
}
class DemoSleep extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 20;i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName() + "==="+i);
}
    }
}